home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power Programmierung
/
Power-Programmierung (Tewi)(1994).iso
/
magazine
/
pctchnqs
/
1990
/
number3
/
antitest.c
< prev
next >
Wrap
C/C++ Source or Header
|
1990-04-15
|
731b
|
27 lines
/**************************************************************************
* Listing 3 - ANTITEST.C Test driver for anti_venom function.
*
* Written by Kevin D. Weeks 10-8-89
* Released to the Public Domain.
*
* Compile using small memory model and link to ANTIVENM.OBJ.
*/
#include <stdio.h>
#define BUF_SIZE 1024
main()
{
int ret_code;
char *buffer;
buffer = (char *)malloc(BUF_SIZE); /* allocate an input buffer */
ret_code = anti_venom(BUF_SIZE,buffer); /* test ourselves */
if (ret_code == -1)
printf("Virus detected\n");
else
if (ret_code == 1)
printf("Execution error\n");
else
printf("OK\n");
}